#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef WARING_EVENT_THREAD_H
#define WARING_EVENT_THREAD_H
/***********************************************************************
  *Copyright 2020-03-06, pyfree
  *
  *File Name       : app info.h
  *File Mark       : 
  *Summary         : 告警信息推送线程,通过日志/短信/邮件推送告警信息
  *告警信息来自三个方面:
  *1)实时数据采集时的判定,如遥信变位、遥信扰动等事件(business_def.h/cpp)
  *2)告警配置策略(alarm.xml)的巡检,满足条件的执行告警(alarm_thread.h/cpp)
  *3)对来及客户端或上层应用下控设置的在规定时间内巡检(verificationForControl),判定下控结果是否符合预期,对不符合的告警
  *Current Version : 1.00
  *Author          : pyfree
  *FinishDate      :
  *
  *Replace Version :
  *Author          :
  *FinishDate      :

 ************************************************************************/
#include "lib_acl.h"
#include "acl_cpp/lib_acl.hpp"

#include "dtypedef.h"
#include "datadef.h"
#include "conf_war.h"
#include "queuedata_single.h"

class MsgToAliyun;
class Email;

class WaringEventThread : public acl::thread
{
public:
	WaringEventThread(bool msg_,bool mail_);
	~WaringEventThread(void);
	void* run();
private:
	bool running;
	bool msgFlag;
	bool mailFlag;
	bool aliyunEvent;
	QueueDataSingle<EventForWaring> *queueforwar;
	QueueDataSingle<JsonEvent> *to_aliyun_event_queue;
	MsgToAliyun *msg_to_ali_ptr;
	Email* email_ptr;
};

#endif
